<template>
  <div id="app">
    <router-view v-if="showView"/>
  </div>
</template>
<script>

export default {
  name: 'App',
  provide(){
    return{
      reload:this.reload
    }
  },
  data(){
    return{
      showView:true
    }
  },
  methods:{
    reload(){
      this.showView=false;
      this.$nextTick(()=> this.showView=true)
    }
  },
  created () {
  // 在页面加载时读取sessionStorage
  if (sessionStorage.getItem('store')) {
   this.$store.replaceState(Object.assign({}, this.$store.state, JSON.parse(sessionStorage.getItem('store'))))
  }
 }
}
</script>

<style>
@import '/css/style.css';
#app{
  width: 100%;
  height: 969px;
  min-width: 1440px;
  min-height: 899px;
  max-width: 1920px;
  max-height: 969px;
  overflow: hidden;
  margin: auto;
  font-family: '宋体';
  
}
</style>
